<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>创建账号</title>
    <link rel="stylesheet" href="/static/weui/weui.min.css">
  </head>
<body>


<div class="page msg_success js_show" tabindex="-1">
    <div class="weui-msg">
        <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
        <div class="weui-msg__text-area">
            <h2 class="weui-msg__title">操作成功</h2>
            <p class="weui-msg__desc"></p>
        </div>
        <div class="weui-msg__tips-area">
          <p class="weui-msg__tips">

            账户已创建成功：<br>用户名：{$extra_data.username}<br/>密码：{$extra_data.password}<br>系统登录地址：http://ai.tinyask.cn/#/login?redirect=%2Faiwrite%2Findex


          </p>
        </div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <a href="javascript:;" onclick="copyUserInfo()" role="button" class="weui-btn weui-btn_default btn" >复制账号信息</a>
            </p>
        </div>
    </div>
    </div>
    <script src="/static/plugs/jquery/jquery.min.js"></script>
    <script> 

        function copyUserInfo() {

            var copy_info = '账户已创建成功：\n系统登录地址：http://ai.tinyask.cn/#/login?redirect=%2Faiwrite%2Findex\n用户名：【{$extra_data.username}】\n密码：【{$extra_data.password}】\n\n使用电脑登录系统即可\n使用有效期为1个月。';
            var tempInput = document.createElement("textarea");
            tempInput.style = "position: absolute; left: -1000px; top: -1000px";
            tempInput.value = copy_info;
            document.body.appendChild(tempInput);
            tempInput.select();
            document.execCommand("copy");
            document.body.removeChild(tempInput);
            alert('信息已复制');

            // $('.btn').attr('data-clipboard-text', copy_info); var clipboard = new Clipboard('.btn');

        }

        
    
    

    </script>
    </body>
    </html>